﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
using Microsoft.Win32;
using System.Windows.Xps.Packaging;

namespace Manual
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void MainWindow_Loaded_1(object sender, RoutedEventArgs e)
        {
            LoadXPSToTreeView();
            loadXPSToViewer();
           
        }

        private void LoadXPSToTreeView()
        {
            XpsDocument xpsDoc = new XpsDocument(".\\Resources\\Documents\\TestDocoment.xps", System.IO.FileAccess.Read);
          //  documentViewer.Document = xpsDoc.GetFixedDocumentSequence();
            Doc doc1 = new Doc();
            doc1.name = "Document1";
            doc1.doc = xpsDoc;

            listBoxDocuments.Items.Add(doc1);
        }

        private void loadXPSToViewer()
        {
          
        }

        private void btnTest_Click(object sender, RoutedEventArgs e)
        {
            string ss = "afsas";
          int cislo =  int.Parse(ss);
        }
    }   
}
